import {getPkgRandomId} from "./util";

const clientType = uni.getSystemInfoSync().platform;

const appInfo = {
	clientType: clientType,
	appKey: "sevensexapp",
	appSecret: "123456",
	deviceId: getPkgRandomId(),
	socketConnectFail: false
} 

function setDeviceID(deviceId){
	appInfo.deviceId = deviceId
}

function setSocketConnectFail(connectionResult) {
	appInfo.socketConnectFail = connectionResult
}



function setClientType(clientType){
	appInfo.clientType = clientType
}

module.exports= {
	appInfo: appInfo,
	setDeviceID: setDeviceID,
	setClientType:setClientType,
	setSocketConnectFail: setSocketConnectFail
}